jQuery.curCSS = function( elem, name ) {
    var ret = '0px';
    var style = elem.style;
    if(window.getComputedStyle){
        var computed = window.getComputedStyle( elem, null );
        if ( computed ) {
            //getPropertyValue兼容ie9获取filter:Alpha(opacity=50)
            ret = computed.getPropertyValue( name ) || computed[ name ];
            //如果是动态创建的元素，则使用style方法获取样式
            if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
                ret = jQuery.style( elem, name );
            }
        }
    }
    return ret;
};